package com.fyl.pattern.mediator;

public class Client {
    public static void main(String[] args) {
        //中介
        MediatorStructure mediator = new MediatorStructure();
        //租客
        Tenant tenant = new Tenant("张三", mediator);
        //房主
        HouseOwner owner = new HouseOwner("李四房主", mediator);

        mediator.setTenant(tenant);
        mediator.setHouseOwner(owner);
        tenant.contact("我也要租李四的房子");
        owner.contact("我这里有房");
    }
}
